public class UserServiceImpl implements UserService {
    @Override
    public void addUser(String name) {
        System.out.println("添加用户: " + name);
    }

    @Override
    public String getUser(int id) {
        if (id < 0) {
            throw new IllegalArgumentException("ID不能为负数");
        }
        return "用户" + id;
    }
}
